<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>报名生成_****</title>
  <link href="<?php echo base_url('css/bootstrap.min.css') ?>" rel="stylesheet">
  <link href="<?php echo base_url('css/common.css') ?>" rel="stylesheet">
  <link href="<?php echo base_url('css/bootstrap-datetimepicker.min.css') ?>" rel="stylesheet">
  <script src="<?php echo base_url('js/jquery-3.2.1.min.js'); ?>"></script>
  <script src="<?php echo base_url('js/bootstrap.min.js'); ?>"></script>
  <script src="<?php echo base_url('js/bootstrap-datetimepicker.min.js'); ?>"></script>
  <script src="<?php echo base_url('js/registration_release.js'); ?>"></script>
</head>
<style>
	h1,h2,h3,h4{
		display: inline-block;
	}
    .btn-wrapper{
        padding-bottom: 10px;
    }
    .mainPage{
    	width: 80%;
    	margin: auto;
    }
    #releaseBtn{
    	width: 40%;
    	margin:10px 30%;
    }
</style>
<body>
  <nav class="navbar navbar-default" style="margin-bottom: 0" role="navigation">
    <div class="container-fluid">
      <div class="navbar-header col-sm-1">
        <a class="navbar-brand" href="javascript:;">LOGO</a>
      </div>
      <ul class="nav navbar-nav col-sm-8">
        <li><a href="<?php echo base_url('main/home') ?>">网站首页</a></li>
        <li><a href="javascript:;">活动查看</a></li>
        <li><a href="javascript:;">活动发布</a></li>
      </ul>
      <ul class="nav navbar-nav" id="user col-sm-7">
        <li id="login"><a href="<?php echo base_url('main/login') ?>" onclick="loginpage()">登录</a></li>
        <li id="register"><a href="#" onclick="init()">注册</a></li>
        <li id="center"><a href="<?php echo base_url('main/pWebAdmin') ?>" onclick="enterCenter()">个人中心</a></li>
        <li id="exit"><a href="#">安全退出</a></li>
      </ul>
    </div>
  </nav>
<div class="container">
	<div class="nav-wrapper">
	    <h1 class="hd-title">生成报名页</h1>
	</div>
    <div class="btn-wrapper">
        <button class="btn btn-info" data-toggle="modal" data-target="#radioModal">添加单选</button>
        <button class="btn btn-info" data-toggle="modal" data-target="#textModal">添加填空</button>
        <button class="btn btn-info" data-toggle="modal" data-target="#checkModal">添加多选</button>
    </div>
	<form method="post" target="radio_iframe" class="form-horizontal" role="form" id="radioForm">
	        <div class="modal fade" id="radioModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	            <div class="modal-dialog">
	                <div class="modal-content">
	                    <div class="bg-primary modal-header">
	                        <button type="button" class="close" data-dismiss="modal">&times;</button>
	                        <input type="text" id="radioTitle" name="radioTitle" class="form-control well" placeholder="选项题目"/>
	                    </div>
	                    <div class="modal-body" id="radioOption">
	                            <div class="form-group">
	                                <label for="radioOption1" class="col-sm-3 control-label">选项1：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="radioOption1" name="radioOption1" class="form-control well" placeholder="输入选项1"/>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label for="radioOption2" class="col-sm-3 control-label">选项2：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="radioOption2" name="radioOption2" class="form-control well" placeholder="输入选项2"/>
	                                </div>
	                            </div>
	                    </div>
	                    <div class="modal-footer">
	                    	<button type="button" class="btn btn-default" onclick="addRadioOption()">添加选项</button>
	                        <button type="submit" class="btn btn-info" onclick="addRadio()" data-dismiss="modal">确认添加</button>
	                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
	                    </div>
	                </div>
	            </div>
	        </div>
	        <iframe id="radio_iframe" name="radio_iframe" style="display:none;"></iframe>  
	</form>

	<form method="post" target="text_iframe" class="form-horizontal" role="form" id="textForm">
	        <div class="modal fade" id="textModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	            <div class="modal-dialog">
	                <div class="modal-content">
	                    <div class="bg-primary modal-header">
	                        <button type="button" class="close" data-dismiss="modal">&times;</button>
	                        <h4>添加填空</h4>
	                    </div>
	                    <div class="modal-body" id="textQuestion">
	                            <div class="form-group">
	                                <label class="col-sm-3 control-label">题目：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="textTitle" name="textTitle" class="form-control well" placeholder="输入题目"/>
	                                </div>
	                            </div>
	                        </form>
	                    </div>

	                    <div class="modal-footer">
	                        <button type="submit" class="btn btn-info" onclick="addTextQuestion()" data-dismiss="modal">确认添加</button>
	                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
	                    </div>
	                </div>
	            </div>
	        </div>
	        <iframe id="text_iframe" name="text_iframe" style="display:none;"></iframe>  
	</form>
	<form method="post" action="check_iframe" class="form-horizontal" role="form" id="checkForm">
	        <div class="modal fade" id="checkModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	            <div class="modal-dialog">
	                <div class="modal-content">
	                    <div class="bg-primary modal-header">
	                        <button type="button" class="close" data-dismiss="modal">&times;</button>
	                        <input type="text" id="checkTitle" name="checkTitle" class="form-control well" placeholder="选项题目"/>
	                    </div>
	                    <div class="modal-body" id="checkOption">
	                            <div class="form-group">
	                                <label for="checkOption1" class="col-sm-3 control-label">选项1：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="checkOption1" name="checkOption1" class="form-control well" placeholder="输入选项1"/>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label for="checkOption2" class="col-sm-3 control-label">选项2：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="checkOption2" name="checkOption2" class="form-control well" placeholder="输入选项2"/>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label for="checkOption3" class="col-sm-3 control-label">选项3：</label>
	                                <div class="col-sm-8">
	                                    <input type="text" id="checkOption3" name="checkOption3" class="form-control well" placeholder="输入选项3"/>
	                                </div>
	                            </div>
	                        </form>
	                    </div>

	                    <div class="modal-footer">
	                    	<button type="button" class="btn btn-default" onclick="addCheckOption()">添加选项</button>
	                        <button type="submit" class="btn btn-info" onclick="addCheck()" data-dismiss="modal">确认添加</button>
	                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
	                    </div>
	                </div>
	            </div>
	        </div>
	</form>
</div>
<div class="mainPage">
	<form action="<?php echo base_url('main/addQuesInfo/'.$iActId) ?>" onsubmit="return upload()" method="post">
		<div id="registration"></div>
		<input type="hidden" id="arr" name="arr" value="">
		<input type="submit" class="btn-primary form-control col-sm-2" id="releaseBtn" value="生成报名页" onclick="upload()">
	</form>
</div>
</body>
<script type="text/javascript">
    $('label[required]').before('<span style="color:red">*</span>');
</script>     
</html>